Skip to content

Canvas & GL small refactoring#6260

Merged
redawl merged 4 commits intofyne-io:developfrom
Vinci10:arbitrary_polygon_minor_changes
Apr 11, 2026
Merged

Canvas & GL small refactoring#6260
redawl merged 4 commits intofyne-io:developfrom
Vinci10:arbitrary_polygon_minor_changes

Conversation

@Vinci10
Copy link
Copy Markdown
Contributor

@Vinci10 Vinci10 commented Apr 8, 2026

Description:

Changes:

  • increased the maximum AribtraryPolygon vertices value to 32
  • removed the public API variable canvas.ArbitraryPolygonVerticesMaximum (it is only needed internally)
  • gl_core, gl_es, gl_gomobile, and gl_wasm previously included identical parameters for each shader, which were initialized during setup and remained immutable. I have removed these fixed parameters, allowing SetUniform* functions to create uniforms dynamically on the first call and cache them. Consequently, there is no longer a need to maintain lists of shader attributes, as the cache is automatically initialized by draw* functions during first object creation
  • added Uniform2fv function along with cache
  • decreased edge softness value (edges looked a bit blurry, especially for web)

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 8, 2026

Coverage Status

coverage: 60.42% (+0.009%) from 60.411% — Vinci10:arbitrary_polygon_minor_changes into fyne-io:develop

@redawl
Copy link
Copy Markdown
Contributor

redawl commented Apr 9, 2026

Is there any background to why these changes are being made? I see more changes here than what is mentioned in the PR description as well.

@Vinci10 Vinci10 changed the title ArbitraryPolygon: increase max vertices to 32 Canvas & GL small refactoring Apr 10, 2026
Copy link
Copy Markdown
Contributor

@redawl redawl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the cleanup in the gl caching as well!

@redawl redawl merged commit 1339ec2 into fyne-io:develop Apr 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants